<?php
	$id=$_GET['id'];
	
	$query="UPDATE advertisements SET nameAdv='$nameAdv',linkAdv='$linkAdv',position='$position',state='$state' WHERE id=$id";
	mysql_query($query);
	echo "Sửa quảng cáo thành công.";
	echo "<script>window.location='index.php?admin=advAdmin&do=listadv'</script>";
?>